<div class="clearfix">
    <?php if (!isset($show_label) || $show_label): ?>
        <?php echo $form[$field]->renderLabel() ?>
    <?php endif; ?>
    <div class="input">
        <?php echo $form[$field] ?>
        <?php if ($form[$field]->hasError()): ?>
            <?php include_partial("common/error", array("form" => $form, "field" => $field, "name_format" => isset($name_format) ? $name_format : $form->getName())) ?>
        <?php endif; ?>
    </div>
</div>